﻿#include "FITKAbaInteractionContactTangentialBehavior.h"


Interface::FITKAbaInteractionContactBehaviorEnum::FITKAbaContactBehaviorType Interface::FITKAbaInteractionContactTangentialBehavior::getBehaviorType() const
{
    return FITKAbaInteractionContactBehaviorEnum::FITKAbaContactBehaviorType::TangentialBehavior;
}

Interface::FITKAbaInteractionContactBehaviorEnum::FrictionFormulation Interface::FITKAbaInteractionContactTangentialBehavior::getFrictionFormulation() const
{
    return m_formulation;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setFrictionFormulation(FITKAbaInteractionContactBehaviorEnum::FrictionFormulation type)
{
    m_formulation = type;
}

Interface::FrictionDiretionalityEnum::FrictionDiretionality Interface::FITKAbaInteractionContactTangentialBehavior::getFrictionDirectionality() const
{
    return m_directionality;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setFrictionDirectionality(FrictionDiretionalityEnum::FrictionDiretionality type)
{
    m_directionality = type;
}

bool Interface::FITKAbaInteractionContactTangentialBehavior::getUseSlipRateDependentData() const
{
    return m_useSlipRateDependent;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setUseSlipRateDependentData(bool state)
{
    m_useSlipRateDependent = state;
}

bool Interface::FITKAbaInteractionContactTangentialBehavior::getUseContactPressureDependentData() const
{
    return m_useContactPressureDependent;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setUseContactPressureDependentData(bool state)
{
    m_useContactPressureDependent = state;
}

bool Interface::FITKAbaInteractionContactTangentialBehavior::getUseTemperatureDependentData() const
{
    return m_useTemperatureDependent;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setUseTemperatureDependentData(bool state)
{
    m_useTemperatureDependent = state;
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getFrictionCoeff(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getFrictionCoeff();
    return 0.0;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setFrictionCoeff(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setFrictionCoeff(value);
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getFrictionCoeff1(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getFrictionCoeff1();
    return 0.0;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setFrictioinCoeff1(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setFrictionCoeff1(value);
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getFrictionCoeff2(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getFrictionCoeff2();
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setFrictionCoeff2(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setFrictionCoeff2(value);
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getSlipRate(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getSlipRate();
    return 0.0;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setSlipRate(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setSlipRate(value);
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getContactPressure(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getContactPressure();
    return 0.0;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setContactPressure(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setContactPressure(value);
}

double Interface::FITKAbaInteractionContactTangentialBehavior::getTemperature(int index) const
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        return m_PenaltyDatas.at(index).getTemperature();
    return 0.0;
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setTemperature(double value, int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        m_PenaltyDatas[index].setTemperature(value);
}

int Interface::FITKAbaInteractionContactTangentialBehavior::getRowCount() const
{
    return m_PenaltyDatas.size();
}

void Interface::FITKAbaInteractionContactTangentialBehavior::setRowCount(int row)
{
    if (row > 1)
        m_PenaltyDatas.resize(row);
}

void Interface::FITKAbaInteractionContactTangentialBehavior::removeRow(int index)
{
    if (index >= 0 && index < m_PenaltyDatas.size())
        if (m_PenaltyDatas.size() > 1)
            m_PenaltyDatas.removeAt(index);
}

void Interface::FITKAbaInteractionContactTangentialBehavior::insetRow(int index)
{
    if (index >= 0 && index <= m_PenaltyDatas.size())
        m_PenaltyDatas.insert(index, PenaltyData());
}

double Interface::PenaltyData::getFrictionCoeff() const
{
    return m_fricCoeff;
}

void Interface::PenaltyData::setFrictionCoeff(double value)
{
    m_fricCoeff = value;
}

double Interface::PenaltyData::getFrictionCoeff1() const
{
    return m_fricCoeff1;
}

void Interface::PenaltyData::setFrictionCoeff1(double value)
{
    m_fricCoeff1 = value;
}

double Interface::PenaltyData::getFrictionCoeff2() const
{
    return m_fricCoeff2;
}

void Interface::PenaltyData::setFrictionCoeff2(double value)
{
    m_fricCoeff2 = value;
}

double Interface::PenaltyData::getSlipRate() const
{
    return m_slipRate;
}

void Interface::PenaltyData::setSlipRate(double value)
{
    m_slipRate = value;
}

double Interface::PenaltyData::getContactPressure() const
{
    return m_contactPressure;
}

void Interface::PenaltyData::setContactPressure(double value)
{
    m_contactPressure = value;
}

double Interface::PenaltyData::getTemperature() const
{
    return m_temperature;
}

void Interface::PenaltyData::setTemperature(double value)
{
    m_temperature = value;
}
